home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / auxlib / aux_redisplay_data.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-18  |  2.7 KB  |  80 lines

  1. /*
  2. ### Redisplay data in combined space ###
  3.  
  4. Note:     aux_win_mode: determines the mode of data display
  5.  
  6.     bombined space(data2) if aun_win_mode>0 (always true if auto_option>0)
  7.     parameter space (data0) if aux_win_mode<=0 and region_index=0
  8.     phase space (data1) if aux_win_mode<=0 and region_index=1
  9.     do nothing:    otherwise
  10. --------------------------------------------------------------------------------
  11. */
  12.  
  13. #include <suntool/sunview.h>
  14. aux_redisplay_data(aux_i)
  15. int aux_i;
  16. {
  17.         int i,j,color,s_type,s_size;
  18.     extern Pixwin **aux_pw;
  19.     extern int var_dim,param_dim,func_dim,full_dim;
  20.         extern int aux_max,*aux_on,**aux_cur_index,*aux_win_mode;
  21.         extern int stop,region_index,pix_type,symbol_size,dot_size;
  22.         extern int n_displayed_data0,n_displayed_data1,n_displayed_data2,n_stored_data0,n_stored_data1,n_stored_data2;
  23.     extern double *t_va;
  24.         extern int *data0_color,*data1_color,*data2_color;
  25.         extern double **data0_x,**data1_x,**data2_x;
  26.  
  27.     stop = 0;
  28.     /* aux window all purpose mode (data2) */
  29.         if(aux_on[aux_i] && aux_win_mode[aux_i] >0){
  30.             aux_reset(aux_i);
  31.             (void) aux_clear_region(aux_i);
  32.         n_displayed_data2 = 0;
  33.             for (i = 0; i < n_stored_data2; i++) {
  34.             decode_color_symbol(data2_color[i],&color,&s_type);
  35.             s_size = (s_type>=0) ? symbol_size : dot_size;
  36.             for(j=0;j<full_dim+param_dim;j++)t_va[j]=data2_x[j][i];
  37.             pen_down(2,aux_pw[aux_i],t_va,color,s_type,s_size,pix_type);
  38.                         n_displayed_data2++;
  39.                 }
  40.         if(stop){
  41.             return;
  42.         }
  43.     }
  44.     /* simulcast mode */
  45.         else if(aux_on[aux_i]){
  46.             aux_reset(aux_i);
  47.             (void) aux_clear_region(aux_i);
  48.         /* Exclusive data1 mode */
  49.         if(aux_cur_index[aux_i][0] <
  50.         full_dim && aux_cur_index[aux_i][1] < full_dim){
  51.                     n_displayed_data1 = 0;
  52.                     for (i = 0; i < n_stored_data1; i++) {
  53.                 for(j=0;j<full_dim;j++) t_va[j] = data1_x[j][i];
  54.                 decode_color_symbol(data1_color[i],&color,&s_type);
  55.                 s_size = (s_type>=0) ? symbol_size : dot_size;
  56.                 pen_down(2,aux_pw[aux_i],t_va,color,s_type,s_size,pix_type);
  57.                             n_displayed_data1++;
  58.                 if(stop){
  59.                     return;
  60.                 }
  61.             }
  62.         }
  63.         /* Exclusive data0 mode */
  64.             else if ( aux_cur_index[aux_i][0] >=
  65.         full_dim && aux_cur_index[aux_i][1] >= full_dim){
  66.                        n_displayed_data0 = 0;
  67.                        for (i = 0; i < n_stored_data0; i++) {
  68.                 for(j=0;j<param_dim;j++) t_va[j+full_dim] = data0_x[j][i];
  69.                 decode_color_symbol(data0_color[i],&color,&s_type);
  70.                 s_size = (s_type>=0) ? symbol_size : dot_size;
  71.                 pen_down(2,aux_pw[aux_i],t_va,color,s_type,s_size,pix_type);
  72.                                 n_displayed_data0++;
  73.                 if(stop){
  74.                     return;
  75.                 }
  76.             }
  77.         }
  78.     }
  79. }
  80.